Skip to content

PR-1b: shim renames — CudaRenderShim → RenderShim, LowerScanPipelineShim → LowerKernelBodyShim#77

Merged
StarGazerM merged 2 commits into
design/redesign-packagefrom
feat/pr-1b-shim-renames
May 19, 2026
Merged

PR-1b: shim renames — CudaRenderShim → RenderShim, LowerScanPipelineShim → LowerKernelBodyShim#77
StarGazerM merged 2 commits into
design/redesign-packagefrom
feat/pr-1b-shim-renames

Conversation

@StarGazerM

Copy link
Copy Markdown
Collaborator

Summary

Second of 5 splits of the original PR-1. Mechanical rename pass: pipeline shim names become target-agnostic so PR-1c's target kwarg + future non-CUDA targets fit cleanly.

Old New Why
CudaRenderShim (name='cuda_render') RenderShim (name='render') PR-1c will pass target through; class shouldn't hardcode CUDA
LowerScanPipelineShim (name='lower_scan_pipeline') LowerKernelBodyShim (name='lower_kernel_body') Describes the role, not the legacy lower_scan_pipeline function name (which dates to M1)

Files touched (6)

  • src/srdatalog/ir/default_pipelines.py — class defs, name= args, DEFAULT_KERNEL_PIPELINE, __all__, assertions, docstrings
  • src/srdatalog/ir/codegen/cuda/api.py — 1 assertion message
  • src/srdatalog/ir/dialects/relation/sorted_array/lowerings/lower_mir_execute_pipeline.py — docstring refs
  • tests/test_default_pipelines_shims.py — imports, pipeline-order assertions, 2 test renames
  • tests/test_lower_mir_execute_pipeline_byte_equivalent.py — docstring/comment refs
  • tests/test_verify_renderability.py — pipeline-order assertion test, comments, 1 test rename

49 insertions / 49 deletions = 98 LOC.

Test plan

  • Target tests (default_pipelines_shims + f5_acceptance + verify_renderability): 41 passed
  • Byte-equivalence (3 suites): 532 passed, 2 skipped
  • Full suite: 1655 passed, 5 skipped (no regressions)
  • mypy on touched files: clean
  • ruff check + format (CI v0.9.10): clean
  • grep CudaRenderShim\|LowerScanPipelineShim src/srdatalog tests examples returns 0 hits

Out of scope (later splits)

  • PR-1c (Compiler.run(target=) kwarg threading)
  • PR-1d (extract CudaRenderCtx from LoweringCtx)
  • PR-1e (pragma scratch flags → kwargs)

Cross-PR conflict expectations

  • PR-1a (in flight): file-disjoint (touches pyproject.toml + core/plugin.py)
  • PR-1c (pending; sequential after this PR): adds target kwarg threading through RenderShim — clean addition

🤖 Generated with Claude Code

…LowerKernelBodyShim

Target-agnostic naming for two kernel-pipeline shims, per
docs/phase_decomposition_redesign.md section 3.3.3.

- CudaRenderShim -> RenderShim (name='cuda_render' -> 'render')
  Drops hardcoded 'Cuda' in the shim name; PR-1c will add the
  target kwarg the shim reads to dispatch.
- LowerScanPipelineShim -> LowerKernelBodyShim
  (name='lower_scan_pipeline' -> 'lower_kernel_body')
  The legacy lower_scan_pipeline function name is historical from
  M1; the SHIM that wraps it should describe the role, not the
  legacy function. Underlying lower_scan_pipeline helper is unchanged.

Pure rename: no behavior, no logic changes. Full byte-equivalence
harness (test_runner_byte_equivalence.py + test_byte_equivalence_jit.py
+ test_cuda_complete_runner.py — 532 fixtures) passes unchanged.

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
StarGazerM added a commit that referenced this pull request May 19, 2026
Pre-existing ruff failure on design/redesign-package — both PR-1a (#78)
and PR-1b (#77) inherit it and fail CI. One-line mechanical re-sort
(ep_has_work_stealing import moved into the alphabetical block below).

No behavior change.

Co-authored-by: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
One-line mechanical re-sort — ep_has_work_stealing import moves into
the alphabetical block. Pre-existing ruff failure on design/redesign-package
blocks PR-1b CI; inlined here so the PR goes CLEAN without a separate
chore-PR dependency.

No behavior change.

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
@StarGazerM
StarGazerM merged commit a160651 into design/redesign-package May 19, 2026
3 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant